package cate.common.table.activity.cutstone.sheet;

import cate.common.table.ESheet;
import cate.common.table.activity.cutstone.row.LevelRandomRow;

import java.util.List;
import java.util.stream.Collectors;

public class LevelRandomSheet extends ESheet<LevelRandomRow> {
    @Override
    public String getSheetName() {
        return "鉴宝概率";
    }

    public List<LevelRandomRow> getListByStartQuality(int quality) {
        return getList().stream().filter(row->row.startQuality==quality).collect(Collectors.toList());
    }

    public int getBestQuality() {
        return getList().stream().mapToInt(row -> row.targetQuality).max().orElse(0);
    }
}
